//
//  ZYHomeTableViewController.swift
//  ZYSinaWeibo
//
//  Created by 陟岳 on 16/5/19.
//  Copyright © 2016年 陟岳. All rights reserved.
//

import UIKit

class ZYHomeTableViewController: UITableViewController {

    var userLogin = false
    override func loadView() {
        
        if userLogin {
            
            super.loadView()
            
        }else{
        
            self.loadLoginView()
        
        }
    }
    
    func loadLoginView () {
    
        view = ZYVisitorLoginView()
    
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        setNavBar()
  
    }
    
    private func setNavBar() {

        let popItem = UIBarButtonItem.init(imageName: "navigationbar_pop", title: nil, target: self, action: #selector(popBtnClick))
        
        navigationItem.rightBarButtonItem = popItem

    }

    @objc private func popBtnClick() {
    
        print("扫一扫")
    
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // MARK: - Table view data source

    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 0
    }

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return 0
    }

  
}
